<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\FrontendMenu */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'frontend_menus'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="frontend-menu-view">

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
//            'id',
            'name',
            [
                'attribute' => Yii::t('common', 'parent_category'),
                'value' => $model->parent_id == 0 ? '--' : \common\models\FrontendMenu::getMenuname($model->parent_id),
            ],
            //'position',
            [
                'attribute' => Yii::t('common', 'position'),
                'value' => \common\helpers\TStringHelper::getFrontendMenuPosition($model->position),
            ],
            'icon',
            'code',
            'url:url',
            'params',
            'order',
            [
                'attribute' => Yii::t('common', 'is_single'),
                'value' => \common\helpers\TStringHelper::getYesOrNo($model->is_single),
            ],
            [
                'attribute' => Yii::t('common', 'status'),
                'value' => \common\helpers\TStringHelper::getStatusText($model->status),
            ],
//            'version',
//            'created_by',
//            'created_at',
//            'created_from',
//            'created_ip',
//            'updated_by',
//            'updated_at',
//            'updated_from',
//            'updated_ip',
//            'is_deleted',
        ],
    ]) ?>

</div>
